<template>
    <div>
        <div class="tab tab_on">
            <span class="tab_left tab_on_left">App管理</span>
            <button class="tab_right tab_on_right"@click="rouBack"><i class="big el-icon-arrow-left"></i>返回</button>
            <button class="tab_right tab_on_right" @click="Refresh"><i class="big el-icon-refresh-left"></i>刷新</button>
        </div>
        <div id="add">
            <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="id" label="编号" width="100"></el-table-column>
                <el-table-column prop="name" label="应用名称" width="100"></el-table-column>
                <el-table-column prop="version" label="版本号" width="100"></el-table-column>
                <el-table-column prop="code" label="编码格式" width="100"></el-table-column>
                <el-table-column prop="download" label="下载地址" width="100"></el-table-column>
                <el-table-column prop="createtime" label="创建时间" width="200"></el-table-column>
                <el-table-column prop="createperson" label="创建人" width="100"></el-table-column>
                <el-table-column prop="description" label="描述" width="180"></el-table-column>
                <el-table-column prop="update" label="是否强制更新" width="100"></el-table-column>
            </el-table>
        </div>
    </div>
</template>

<script>
    export default {
        inject:['reload'],
        data() {
            return {
                tableData: []
            }
        },
        methods: {
            //刷新页面
            Refresh(){
                this.reload();
            },
            //返回上一页
            rouBack(){
                this.$router.back()
            },
        },
        created() {
            //请求表的数据
            this.$http.get("/app/getall").then(res => {
                this.tableData = res.data
            })
        }
    }
</script>

<style scoped>
    .tab{
        height: 42px;
        background-color: #F3F3F3;
        border: 1px #E4E4E4 solid;
        line-height: 2.5;
    }
    #add{
        width: 1080px;
        padding: 20px 50px 20px 20px;
        /*margin: 0 auto;*/
        height: 725px;
    }
    .tab_on{
        margin: -20px 0px 12px -20px;
        padding: 0px 10px 4px 0px;
        width: 102%;
    }
    .tab_left{
        margin: 0px 0px 0px 9px;
        font-size: 13px;
    }
    .tab_on_left{
        color: #A2A2A2;
        font-size: 15px;
    }
    .tab_right{
        margin: 10px 15px 0px 0px;
        padding: 4px 13px;
        float: right;
        font-size: 12px;
        background: white;
        border: 2px #D8D8D8 solid;
    }
    .tab_on_right{
        padding: 4px 17px;
        font-size: 12px;
        color: #9A9A9A;
    }
</style>